#pragma once
#include <mutex>
#include <string>
#include <thread>
#include <algorithm>
#include <chrono>

#include <area_scan_3d_camera/Camera.h>
#include <area_scan_3d_camera/api_util.h>

#include "DataX.h"

class CMeCamera
{
public:
    CMeCamera();
    virtual ~CMeCamera();

private:
    mmind::eye::Camera m_camera;
    bool m_bOpen = false;
    bool m_bFileCamera = false;
    int m_iFrameID = -1;
    mutable std::mutex m_mutex;

public:
    bool EnumDevices(s_DevicesInfo& sInfo);
    bool IsOpen();
    bool Open(std::string HardwareIdentification);
    bool SoftwareTrigger(s_Image3dS& image3dS, unsigned int iTime = 10000);
    void Close();
};
